package com.swx.identityservice.mapper;


import com.swx.identityservice.models.ScbpUser;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface ScbpUserMapper extends Mapper<ScbpUser> {
    List<ScbpUser> selectAllWithOutDeletedByUserAndWorkNum(
            @Param(value = "affiliateddept") String AffiliatedDept,
            @Param(value = "worknum") String WorkNum,
            @Param(value = "username") String UserName,
            @Param(value = "account") String Account,
            @Param(value = "phonenumber") String PhoneNumber,
            @Param(value = "email") String Email,
            @Param(value = "idnumber") String IdNumber,
            @Param(value = "cardtype") String CardType,
            @Param(value = "isinformal") Boolean IsInformal);

    List<ScbpUser> selectUsersByDeptId(Integer id);

    List<ScbpUser> selectUsersAndRolesById(Integer id);

    List<ScbpUser> selectDeptsByUserId(Integer id);

    int selectCountByDeptId(int id);

    ScbpUser selectUserByName(String UserName);

    int selectCountByRoleId(Integer RoleIds);
}
